import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:honeypotflutter/public/public_get.dart';
import 'package:honeypotflutter/publicBussine/bussine_colors.dart';
import 'package:honeypotflutter/publicBussine/bussine_font.dart';
import 'package:honeypotflutter/publicBussine/bussine_image.dart';
import 'package:honeypotflutter/publicBussine/loginInfo/bussine_userInfo.dart';
import 'package:honeypotflutter/publicBussine/view/bussine_button.dart';
import 'package:honeypotflutter/public/views/public_appBar.dart';
import 'package:honeypotflutter/public/views/public_scrollView.dart';
import 'logic.dart';

class AccountSignedSuccessPage extends StatefulWidget {
  const AccountSignedSuccessPage({Key? key}) : super(key: key);

  @override
  State<AccountSignedSuccessPage> createState() => _AccountSignedSuccessPageState();
}

class _AccountSignedSuccessPageState extends State<AccountSignedSuccessPage> {
  final AccountSignedSuccessLogic logic = Get.put(AccountSignedSuccessLogic());
  UserInfoLogic _userInfoLogic = Get.find<UserInfoLogic>();

  @override
  void initState() {
    // TODO: implement initState
    super.initState();
    _userInfoLogic.requestUserInfo();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: MGColors.whileColor,
      appBar: HLAppBar(
        navigationTitle: "签约",
        showBackLeading: false,
        showBottomLine: true,
      ),
      body: HLScrollView(
        crossAxisAlignment: CrossAxisAlignment.center,
        padding: EdgeInsets.only(top: 40),
        children: [
          Image.asset(MGImage.image("public_success"), width: 80),
          SizedBox(height: 20),
          Text(
            "签约成功",
            style: TextStyle(
              fontWeight: FontWeight.bold,
              fontSize: MGFont.titleFont1,
              color: MGColors.text1Color,
            ),
          ),
          SizedBox(height: 20),
          Text(
            "签约已成功，你可以进行提现操作",
            style: TextStyle(
              fontSize: MGFont.textFont1,
              color: MGColors.text3Color,
            ),
          ),
          SizedBox(height: 30),
          MGButton(
            title: "返回",
            margin: EdgeInsets.only(left: 40, right: 40),
            buttonAction: () {
              HLGet.back();
            },
          )
        ],
      ),
    );
  }

  @override
  void dispose() {
    Get.delete<AccountSignedSuccessLogic>();
    super.dispose();
  }
}
